import { get_month_first,get_date } from '@/const/crud/rca/common.js'
export const startDate = get_month_first(0);
export const endDate = get_date(0);
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  viewBtn:true,
  labelWidth: 120,
  searchMenuSpan: 6,
  searchLabelWidth: 100,
  selection: true,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      "hide": true,
      "display": false
    },	  {
      "width":"120",
      "type": "select",
      "label": "设备类型",
      "prop": "deviceType",
      dicUrl: '/support/swpmticketcardtypeparam/dictFaultDeviceType',
      cascaderItem: ["deviceOrder"],
      search: true,
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择设备类型",
        trigger: "blur"
      }]
    },	  {
      "type": 'select',
      "label": "设备编号",
      "prop": "deviceOrder",
      dicUrl: '/support/swpmticketcardtypeparam/dictFaultDeviceType/{{key}}',
      search: true,
      dicFlag: false,
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择设备编号",
        trigger: "blur"
      }]
    },  {
      type: "date",
      label: "故障发生时间",
      prop: "faultTimeDto",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      searchValue: [startDate, endDate], 
      searchSpan: 12,
      searchRange: true,
      search: true,
      hide: true,
      display: false
    },  {
      "width":"160",
      "type": "datetime",
      "label": "故障发生时间",
      "prop": "faultTime",
      "format": "yyyy-MM-dd HH:mm:ss",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
      //search: true,
      rules: [{
        required: true,
        message: "请选择故障发生时间",
        trigger: "blur"
      }]
    },  {
      "width":"200",
      "type": "input",
      "label": "故障原因",
      "prop": "faultReason"
    },	 {
      "width":"120",
      "type": "select",
      "label": "故障报修人",
      "prop": "handlePersonName",
      component: "user-select",
      params: {
        userCodeKey: "handlePersonCode"
      },
      search: false,
      rules: [{
        required: true,
        message: "请选择故障报修人",
        trigger: "blur"
      }]
    },	  {
      "width":"120",
      "type": "input",
      "label": "报修人工号",
      "prop": "handlePersonCode",
      search: false,
      disabled: true
    },	  {
      "type": "input",
      "label": "维修人员",
      "prop": "reviewerName",
      /*component: 'user-select',
      params: {
        userCodeKey: 'reviewerCode'
      },*/
      search: false
    },/*	  {
      "width":"120",
      "type": "input",
      "label": "维修人员工号",
      "prop": "reviewerCode",
      search: false,
      disabled: true
    },  */{
      "width":"160",
      "type": "datetime",
      "label": "故障修复时间",
      "prop": "repairTime",
      "format": "yyyy-MM-dd HH:mm:ss",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
    }, 	 {
      hide: true,
      "width":"200",
      "type": "textarea",
      "label": "故障描述",
      "prop": "faultProblem",
      "span": 24
    }, 	 {
      hide: true,
      "type": "textarea",
      "label": "备件更换记录",
      "prop": "replaceRecord",
      "span": 24
    },    {
      hide: true,
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      "span": 24
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      "hide": true,
      "display": false
    }]
}
